﻿export default [
  {
    path: '/',
    redirect: '/welcome',
  },
  {
    path: '/welcome',
    name: '欢迎',
    icon: 'smile',
    component: '@/pages/Welcome',
  },
  {
    path:"/service",
    routes: [
      {
        path: "/service/user/center",
        component: "@/pages/account/center",
        name: "个人中心"
      },
      {
        path: "/service/user/settings",
        component: "@/pages/account/settings",
        footerRender: false,
        name: "个人设置"
      },
      {
        component: './404',
      },
    ]
  },
  {
    path:"/wechat",
    layout: false,
    routes: [
      {
        path: "/wechat/call",
        component: "@/pages/wechat/auth",
        name: "微信登陆"
      },

      {
        component: './404',
      },
    ]
  },
  {
    path:"/user",
    layout: false,
    routes: [
      {
        path: "/user/login",
        component: "@/pages/login/login",
        name: "登陆"
      },
      {
        path: "/user/choose/service",
        component: "@/pages/login/login/Choose",
        name: "服务商选择",
        
      },
      {
        path: "/user/wechat/login",
        component: "@/pages/login/login/wechat",
        name: "服务商微信登陆",
        
      },
      {
        path: "/user/wechat/register",
        component: "@/pages/login/register",
        name: "微信扫码注册",
        
      },
      {
        path: "/user/register/form",
        component: "@/pages/login/register/Form",
        name: "微信扫码注册",
        
      },
      {
        component: './404',
      },
    ]
  },
  {
    path: "/admin",
    name: "用户",
    icon: 'user',
    access: "admin",
    routes: [
      {
        path: "/admin/index",
        name: "用户管理",
        component: "@/pages/admin/user",
        footerRender: false,
        hideInBreadcrumb: true,
        access: "admin_user",
      },
      {
        path: "/admin/role",
        name: "角色管理",
        component: "@/pages/admin/role",
        footerRender: false,
        hideInBreadcrumb: true,
        access: "admin_role",
      },
      {
        name:"权限分配",
        hideInMenu: true,
        path: "/admin/role/configrule",
        component: "@/pages/admin/components/configrule",
        footerRender: false,
        hideInBreadcrumb: true,
        access: "admin_role_update",
      },
      {
        component: './404',
      },
    ]
    
  },
  {
    component: './404',
  },
];
